package com.infitecs.eyas.toolbar.service;

import com.infitecs.eyas.toolbar.dao.ToolBarDataDao;
import com.infitecs.eyas.toolbar.model.ToolBar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by pzw on 9/13/2015.
 */
@Service
public class ToolBarDataService {

    @Autowired
    private ToolBarDataDao toolBarDataDao;


    public int addToolBarData(ToolBar toolBar) {
        return toolBarDataDao.addCalValue(toolBar);
    }

    public int updateTollBarData(ToolBar toolBar) {
        return toolBarDataDao.updateCalValue(toolBar);
    }

    public int deleteToolBar(Integer id) {
        return toolBarDataDao.deleteCalValue(id);
    }

    public ToolBar getToolBarByCalId(Integer id) {
        return toolBarDataDao.getToolBarByCalId(id);
    }

}
